//
//  Edu_2018.h
//  Edu_iOS2018
//
//  Created by yanyan on 2017/12/28.
//  Copyright © 2017年 yanyan. All rights reserved.
//

#ifndef Edu_2018_h
#define Edu_2018_h


#define WX_APPID @"wx7151cc4f9794c50d"//@"wx426b3015555a46be"
/*start  系统通知  start*/

//登录通知
#define kNotifactionUserLogin           @"UserLoginNotifaction"
//退出登录通知
#define kNotifactionUserLogout          @"UserLogoutNotifaction"
//接受加入学习通知
#define kNotifactionUserAddOrBuyLearn   @"kNotifactionUserAddOrBuyLearn"
//详情界面,点击立即学习通知
#define kNotifactionUserGoToLearn       @"kNotifactionUserGoToLearn"


//目录界面,是否有免费课时(有免费课时情况:详情界面上部显示"免费试学"按钮,反之则无)
#define kNotifactionExistFreeLesson     @"kNotifactionExistFreeLesson"
//PDF页面返回通知
#define kNotifactionPDFViewController   @"pdfviewControllerexit"
//文本页面已学完通知
#define kNotifactionTextLearned         @"kNotifactionTextLearned"
//音频播放界面 播放完成 发送该通知 给"详情页" 暂停定时器
#define kNotifactionAudioPlayingStatus  @"kNotifactionAudioPlayingStatus"

#define kNotifactionPaySuccess     @"kNotifactionPaySuccess" // 支付完成跳转到已支付订单
#define kPayResultShowDuration     2
/*end  系统通知  end*/



/*start  系统提示语  start*/
//token失效提示语
#define kAlertTipOfTokenFailure         @"用户信息已失效,请重新登录"
//网络请求错误提示语
#define kAlertTipOfInternetFailure      @"数据请求失败,请重新请求"
// 删除的课程进入详情
#define kAlertTipOfCourseDelete @"抱歉，课程已删除无法购买或学习。如有疑问请咨询客服。"
// 关闭的课程 进行提示
#define kAlertTipOfCourseClosed  @"抱歉，课程已关闭无法购买或学习。如有疑问请咨询客服。"

#define kAlertTipOfPasswordValid  @"密码应为6-20位字符，区分大小写"

/*end  系统提示语  end*/

// 首页选择分类 id 的 key
#define kSelectedCategoryIdOfHome  @"selectedCategoryId"


//程序中占位图名字的宏定义
//课程占位图
#define kEduCourseImagePlaceholderName @"goods_placeholder"
//首页轮播图
#define kEduHomeScrollImagePlaceholderName @"scrollview_placeholder"
//分类占位图
#define kEduCategoryPlaceholderName @"placeholder"
//用户头像的占位图
#define kEduUserAvatarPlaceholderName @"Mine_iconImage"

#define kMainThemeColor [UIColor colorWithRed:0.1137 green:0.6549 blue:0.8745 alpha:1]
// 橙色的主色
#define ECTHEMESELECTEDCOLOR  [UIColor colorWithHexString:@"#ff6700"]//[UIColor colorWithRGBRed:255 green:102 blue:0]
//[UIColor colorWithRed:0.9882 green:0.4039 blue:0.1294 alpha:1]

#define kTabbarIconFont [UIFont systemFontOfSize:16]
#define kScreenWidth [UIScreen mainScreen].bounds.size.width
#define kScreenHeight [UIScreen mainScreen].bounds.size.height
#define kTabbarHeight (kScreenHeight == 812.0 ? 83 : 49)
#define kNavHeight (kScreenHeight == 812.0 ? 88 : 64)
#define TABLEVIEWCONTENT_OFFSET_Y  (kScreenWidth * 0.5625 - kNavHeight)//(200-kNavHeight)
// 底部宏
#define kSafeAreaBottomHeight (kScreenHeight == 812.0 ? 34 : 0)

#define WeakSelf(weakSelf) __weak __typeof(&*self)weakSelf = self;  
//  首页&课程 的列表，订单课程列表的圆角
#define kCourseImageCornerRadius  5
#define kPercentage (kScreenWidth / 320.0)
#define kProportion_Height(R)      ((R)*kScreenWidth/1080.0)

#define kProportion_Width(R)      (R)*((kScreenWidth)/1080.f)
//#define kProportion_Height(R)     (R)*(0.305556)

#define KProportion1080_Width     (kScreenWidth/1080.f)
#define KProportion1080_Heigh     (44.f/144.f)

#define LBXScan_Define_Native  //下载了native模块
#define LBXScan_Define_UI      //下载了界面模块

#define kOrderStateCancelled @"cancelled"
#define kOrderStatePaid @"paid"
#define kOrderStateCreated @"created"

#ifdef DEBUG
#define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
#define DLog(...)
#endif

#define TICK   NSDate *startTime = [NSDate date]
#define TOCK   NSLog(@"Time: %f", -[startTime timeIntervalSinceNow])
// 详情的 header 的高度
#define HEADERVIEW_HEIGHT (kScreenWidth * 0.5625 + TABBAR_TITLE_HEIGHT)
#define TABBAR_TITLE_HEIGHT  43
#endif /* Edu_2018_h */
#import "Edu_iOS_Header.h"
